// JavaScript Document
(function(){
	var Event = YAHOO.util.Event,
	Dom = YAHOO.util.Dom,
	Element = YAHOO.util.Element;
	
	
	Event.onDOMReady(function() {
		
		Event.on("shrinkBar","click",function(){
			if(Dom.hasClass("shrinkBar","shrink-bar-on")){
				Dom.replaceClass("shrinkBar","shrink-bar-on","shrink-bar-off");
				Dom.addClass("m-managerBody","hide-side");
			} else {
				Dom.replaceClass("shrinkBar","shrink-bar-off","shrink-bar-on");
				Dom.removeClass("m-managerBody","hide-side");
			}
		})
		var aEles = YAHOO.util.Selector.query(".title");
		Event.on(aEles,"click",handleMenu);
		
		function handleMenu() {
			var nextNode = Dom.getNextSibling(this);
			if(Dom.hasClass(nextNode,"dn")) {
				Dom.removeClass(this,"expand");
				Dom.removeClass(nextNode,"dn");
			} else {
				Dom.addClass(this,"expand");
				Dom.addClass(nextNode,"dn");
			}
		}
		
		
	});
})();


